Skip to content

Instantly share code, notes, and snippets.

@lavantien
lavantien / resume_public.typ
Created January 18, 2026 19:32
resume_public.typ
#!/usr/bin/env typst
// vim: syntax=typst
// ==============================================================================
// CONFIGURATION
// ==============================================================================
#set page(
paper: "a4",
@rexim
rexim / o.c
Created January 17, 2026 23:42
// cc -o o ./o.c && ./o > o.py
#include <stdio.h>
#include <string.h>
int main()
{
char buf[256];
const char *self = "# python ./o.py > o.c\nself = \"?\"\nfor x in self.split(chr(124))[1]:\n if ord(x) == 63:\n for y in self:\n if y == '\\n': print(\"\\\\n\", end='')\n elif y == '\"': print(\"\\\\\\\"\", end='')\n elif y == '\\\\': print(\"\\\\\\\\\", end='')\n else: print(f\"{y}\", end='')\n else:\n print(x, end='')\n|// cc -o o ./o.c && ./o > o.py\n#include <stdio.h>\n#include <string.h>\n\nint main()\n{\n char buf[256];\n const char *self = \"?\";\n int n = strlen(self);\n for (int i = 0; self[i] != 124; ++i) {\n if (self[i] == 63) {\n for (int j = 0; j < n; ++j) {\n switch (self[j]) {\n case '\\n': printf(\"\\\\n\"); break;\n case '\"': printf(\"\\\\\\\"\"); break;\n case '\\\\': printf(\"\\\\\\\\\"); break;\n default: printf(
@sarkrui
sarkrui / install-cloudflared.md
Created May 31, 2023 12:19
Install Cloudflared on Alpine Linux

Cloudflared Setup Guide

This guide will walk you through setting up Cloudflared on your system.

Pre-Requisites

You need to have administrative (sudo) access to your system.

Here are the steps to install Cloudflared.

@ansaso
ansaso / google_calendar_color_map.md
Last active January 18, 2026 19:38
google calendar color mapping. name (string) to id (integer).

intro

As of 2020-07-27 The default google calendar api response does not include the user visible names:

google calendar color choice.

Below is a json map for all the default colors. Please note:

  • colorId empty for event with default color
  • different colorId for the same color in Calendar and Event (ex. Tomato: 11 and 3)
  • there is no consistent logic in the enumeration of the colors
@liuran001
liuran001 / config.yaml
Last active January 18, 2026 19:35
mihomo (Clash Meta) 懒人配置
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. ssLinks 邀请码: fSo2OhzH https://98a6251b6cd7471da86cca993b6dbe6f.36d.biz/#/register?code=fSo2OhzH
# 2. 一元机场 邀请码: r3f1duds https://xn--4gq62f52gdss.top/#/register?code=r3f1duds
# 一定要填我的邀请码,不填我哭给你看😭
# mihomo (Clash Meta) 懒人配置
# 版本 V1.23-251221
@sunmeat
sunmeat / rate.md
Last active January 18, 2026 19:34
Rate Limiting у ASP.NET Core

Rate Limiting у ASP.NET Core

(Microsoft.AspNetCore.RateLimiting)

Вбудований middleware для обмеження кількості запитів від клієнта за певний період часу.
Основні задачі:

  • Захист від brute-force, DDoS, зловмисного навантаження
  • Запобігання перевантаженню сервера
  • Забезпечення справедливого розподілу ресурсів
  • Критично важливий для публічних API
@davidk
davidk / README.md
Last active January 18, 2026 19:29
Workaround for code-server `npx argon2-cli -e`

echo -n 'password' | npx argon2-cli -e is documented as the way to created a hashed version of a password for use with code-server, but this doesn't work and argon2-cli is currently unmaintained.

Workaround

Change SALT="" to your own value: SALT="gerhgilrehilgekq"

  • Podman or Docker works as a runtime too
 $ podman run -it ubuntu
@SansPapyrus683
SansPapyrus683 / debugging.h
Last active January 18, 2026 19:28
A useful debugging template for C++.
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& out, const std::pair<T1, T2>& pair);